﻿using EasyI18n.Api.Controllers.Bases;
using EasyI18n.Api.Primary.Contracts.ProjectContracts;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace EasyI18n.Api.Controllers;

public class ProjectController : WebBaseController
{
    /// <summary>
    /// 创建项目
    /// </summary>
    /// <param name="command"></param>
    /// <returns></returns>
    [HttpPost]
    [ProducesResponseType(typeof(CreateProjectCommand), StatusCodes.Status200OK)]
    [AllowAnonymous]
    public async Task<IActionResult> CreateProjectAsync(CreateProjectCommand command)
    {
        await Mediator.SendAsync(command);
        return Ok();
    }
}